package com.tianqu.tms.www.cardect.controller;

import java.util.List;

import com.tianqu.tms.core.base.Logger;
import com.tianqu.tms.core.base.TmsController;
import com.tianqu.tms.core.base.TxController;
import com.tianqu.tms.core.base.UserContext;
import com.tianqu.tms.core.exception.TmsDaoException;
import com.tianqu.tms.core.exception.TmsException;
import com.tianqu.tms.core.exception.TransactionException;
import com.tianqu.tms.core.util.StringUtil;
import com.tianqu.tms.core.util.TmsConstants;
import com.tianqu.tms.entity.TmsDetectInfo;
import com.tianqu.tms.entity.TmsDetectPic;
import com.tianqu.tms.entity.TmsDetectSenior;
import com.tianqu.tms.www.cardect.viewhelper.CarSeniorDetectViewHelper;

/**
 * 待检测（人工）列表页进入高级检测详细页Controller
 * 
 * @author tianshifu
 * 
 */
public class CarWDPersonSDInfoDetailController extends TmsController {
	private Logger logger = Logger
			.getLogger(CarWDPersonSDInfoDetailController.class);// log
	private static final String CARSERIAL = "carSerial";// 页面传过来的车辆ID
	// private static final String CHKMODEL = "chkModel";//检测模式
	private static final String CARDETECTID = "carDetectId";// 检测报告ID
	private static final String SENIOR_DETECT_INPUT_DATA = "senior_detect_input_data";// 检测录入信息
	private static final String IMGLIST = "imgList";// 用于存放图片对象的list

	@Override
	public void execute(UserContext uc) throws Exception {
		logger.debug(this.getClass().getName() + "#execute was called.");
		TxController controller = TxController.getTxController();

		// 添加事务提交异常捕获
		try {
			controller.begin();
			// 从tis_car_info表中取出基本信息，八大配置，行驶里程，检测ID和检测模式
			String carSerial = (String) uc.getAttribute(CARSERIAL);
			// String chkModel = (String)uc.getAttribute(CHKMODEL);
			int carDetectId = (Integer) uc.getAttribute(CARDETECTID);

			CarSeniorDetectViewHelper view = new CarSeniorDetectViewHelper();// 用于详细页viewhelp

			TmsDetectInfo carEntity = TmsDetectInfo.getInstance();
			carEntity = carEntity.getWDIpadCarInfoBySerial(carSerial, 3);// 获取存在基本表中的检测信息
			// 将基本表中的数据set到viewhelp中
			view = setViewhelpFromCarEntity(view, carEntity);// 将tis_car_info表数据set到viewhelp中

			view.setBidStatus(String.valueOf(carEntity.getBidStatus()));

			TmsDetectSenior decEntity = TmsDetectSenior.getInstance();
			decEntity = decEntity.findCarSeniorDetectInfoById(carDetectId);// 查询出高级检测信息

			// 将高级检测表的数据set到viewhelp中,需要将空值给个默认值
			view = setViewhelpFromDecEntity(view, decEntity);

			uc.removeAttribute(TmsConstants.VIEWHELP);
			uc.setAttribute(TmsConstants.VIEWHELP, view);// 用于检测信息查看页

			/***************** 数据库原始数据用于检测信息修改 *************************/
			CarSeniorDetectViewHelper updateView = new CarSeniorDetectViewHelper();// 用于详细页viewhelp
			updateView = setViewhelpFromCarEntity(updateView, carEntity);// 将tis_car_info表数据set到viewhelp中
			// 将高级检测表的数据set到viewhelp中,原装
			updateView = setUpdateViewhelpFromDecEntity(updateView, decEntity);

			// 需要传递一个图片类型 imgType 1为整体图片 2为检测图片
			TmsDetectPic picEntity = TmsDetectPic.getInstance();
			List<TmsDetectPic> picListType1 = picEntity
					.findDetectPicInfoByDetectIdAndImgType(carDetectId, 1);// 整体

			List<TmsDetectPic> picListType2 = picEntity
					.findDetectPicInfoByDetectIdAndImgType(carDetectId, 2);// 具体位置检测图片

			List<TmsDetectPic> picAllList = picEntity
					.findDetectPicInfoByDetectId(carDetectId);
			// 如果整体图片为空 则赋空
			if (picListType1 != null) {
				for (int i = 0; i < picListType1.size(); i++) {
					// 将图片信息set到viewhelp中
					picEntity = picListType1.get(i);
					setPicViewFromEntity(view, picEntity);

				}
			} else {
				// 没有图片
				view.setImg01("");
				view.setImgType("");
				view.setImg02("");
				view.setImg03("");
				view.setImg04("");
				view.setImg05("");
				view.setImg06("");
			}
			// 具体检测位置图片信息
			if (picListType2 != null) {
				for (int i = 0; i < picListType2.size(); i++) {
					// 将图片信息set到viewhelp中
					picEntity = picListType2.get(i);
					setPicViewFromEntity(view, picEntity);

				}
			} else {
				// 没有图片
				view.setImg1("");
				view.setImg2("");
				view.setImg3("");
				view.setImg4("");
				view.setImg5("");
				view.setImg6("");
				view.setImg7("");
				view.setImg8("");
				view.setImg9("");
				view.setImg10("");
				view.setImg11("");
				view.setImg12("");
				view.setImg13("");
				view.setImg14("");
				view.setImg15("");
				view.setImg16("");
				view.setImg17("");
				view.setImg18("");
				view.setImg19("");
				view.setImg20("");
				view.setImg21("");
				view.setImg22("");
				view.setImg23("");
				view.setImg24("");
				view.setImg25("");
				view.setImg26("");
				view.setImg27("");
				view.setImg28("");
				view.setImg29("");
				view.setImg30("");
				view.setImg31("");
				view.setImg32("");
				view.setImg33("");
				view.setImg34("");

			}
			// 将图片list放到uc中等待调用
			uc.setAttribute(IMGLIST, picAllList);// 还需要一个整体图片+具体检测位置图片

			uc.removeAttribute(SENIOR_DETECT_INPUT_DATA);
			uc.setAttribute(SENIOR_DETECT_INPUT_DATA, view);// 将信息set到uc中用于修改页调用

			controller.commit();
		} catch (Exception e) {
			try {
				controller.rollback();
			} catch (TransactionException e1) {
				throw new TmsException(TmsException.DB_TXCRROR, e1);
			}
			// 系统异常
			if (e instanceof TmsException) {
				throw e;
			}
			throw new TmsException(TmsException.DB_TXCRROR, e);
		}

		logger.debug(this.getClass().getName() + "#doAction was completed.");

	}

	/***
	 * 
	 * 将图片信息从entity set到viewhelp中
	 * 
	 */
	private CarSeniorDetectViewHelper setPicViewFromEntity(
			CarSeniorDetectViewHelper view, TmsDetectPic entity) {

		if (entity.getImgType() == 1)// 整体图片
		{
			if (entity.getImgKey().equals("1")) {
				view.setImg01(entity.getImgPath());
				view.setImgType(String.valueOf(entity.getImgType()));
			}
			if (entity.getImgKey().equals("2")) {
				view.setImg02(entity.getImgPath());
				view.setImgType(String.valueOf(entity.getImgType()));
			}
			if (entity.getImgKey().equals("3")) {
				view.setImg03(entity.getImgPath());
				view.setImgType(String.valueOf(entity.getImgType()));
			}
			if (entity.getImgKey().equals("4")) {
				view.setImg04(entity.getImgPath());
				view.setImgType(String.valueOf(entity.getImgType()));
			}
			if (entity.getImgKey().equals("5")) {
				view.setImg05(entity.getImgPath());
				view.setImgType(String.valueOf(entity.getImgType()));
			}
			if (entity.getImgKey().equals("6")) {
				view.setImg06(entity.getImgPath());
				view.setImgType(String.valueOf(entity.getImgType()));
			}
		}
		if (entity.getImgType() == 2)// 检测图片
		{
			if (entity.getImgKey().equals("1")) {
				view.setImg1(entity.getImgPath());
			}
			if (entity.getImgKey().equals("2")) {
				view.setImg2(entity.getImgPath());
			}
			if (entity.getImgKey().equals("3")) {
				view.setImg3(entity.getImgPath());
			}
			if (entity.getImgKey().equals("4")) {
				view.setImg4(entity.getImgPath());
			}
			if (entity.getImgKey().equals("5")) {
				view.setImg5(entity.getImgPath());
			}
			if (entity.getImgKey().equals("6")) {
				view.setImg6(entity.getImgPath());
			}
			if (entity.getImgKey().equals("7")) {
				view.setImg7(entity.getImgPath());
			}
			if (entity.getImgKey().equals("8")) {
				view.setImg8(entity.getImgPath());
			}
			if (entity.getImgKey().equals("9")) {
				view.setImg9(entity.getImgPath());
			}
			if (entity.getImgKey().equals("10")) {
				view.setImg10(entity.getImgPath());
			}
			if (entity.getImgKey().equals("11")) {
				view.setImg11(entity.getImgPath());
			}
			if (entity.getImgKey().equals("12")) {
				view.setImg12(entity.getImgPath());
			}
			if (entity.getImgKey().equals("13")) {
				view.setImg13(entity.getImgPath());
			}
			if (entity.getImgKey().equals("14")) {
				view.setImg14(entity.getImgPath());
			}
			if (entity.getImgKey().equals("15")) {
				view.setImg15(entity.getImgPath());
			}
			if (entity.getImgKey().equals("16")) {
				view.setImg16(entity.getImgPath());
			}
			if (entity.getImgKey().equals("17")) {
				view.setImg17(entity.getImgPath());
			}
			if (entity.getImgKey().equals("18")) {
				view.setImg18(entity.getImgPath());
			}
			if (entity.getImgKey().equals("19")) {
				view.setImg19(entity.getImgPath());
			}
			if (entity.getImgKey().equals("20")) {
				view.setImg20(entity.getImgPath());
			}
			if (entity.getImgKey().equals("21")) {
				view.setImg21(entity.getImgPath());
			}
			if (entity.getImgKey().equals("22")) {
				view.setImg22(entity.getImgPath());
			}
			if (entity.getImgKey().equals("23")) {
				view.setImg23(entity.getImgPath());
			}
			if (entity.getImgKey().equals("24")) {
				view.setImg24(entity.getImgPath());
			}
			if (entity.getImgKey().equals("25")) {
				view.setImg25(entity.getImgPath());
			}
			if (entity.getImgKey().equals("26")) {
				view.setImg26(entity.getImgPath());
			}
			if (entity.getImgKey().equals("27")) {
				view.setImg27(entity.getImgPath());
			}
			if (entity.getImgKey().equals("28")) {
				view.setImg28(entity.getImgPath());
			}
			if (entity.getImgKey().equals("29")) {
				view.setImg29(entity.getImgPath());
			}
			if (entity.getImgKey().equals("30")) {
				view.setImg30(entity.getImgPath());
			}
			if (entity.getImgKey().equals("31")) {
				view.setImg31(entity.getImgPath());
			}
			if (entity.getImgKey().equals("32")) {
				view.setImg32(entity.getImgPath());
			}
			if (entity.getImgKey().equals("33")) {
				view.setImg33(entity.getImgPath());
			}
			if (entity.getImgKey().equals("34")) {
				view.setImg34(entity.getImgPath());
			}
		}
		return view;
	}

	/**
	 * 
	 * 将存在基本表中的检测信息set到viewhelp中
	 * 
	 * @throws TmsDaoException
	 * 
	 */
	private CarSeniorDetectViewHelper setViewhelpFromCarEntity(
			CarSeniorDetectViewHelper view, TmsDetectInfo entity)
			throws TmsDaoException {
		view.setMileage(String.valueOf(entity.getMileage()));// 表显里程
		view.setCarDescribe(entity.getCarDescribe());// 检测说明
		return view;
	}

	/**
	 * 将高级检测信息set到viewhelp中,详细页
	 * 
	 * 如果为空，则给个默认值“-”
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	private CarSeniorDetectViewHelper setViewhelpFromDecEntity(
			CarSeniorDetectViewHelper view, TmsDetectSenior entity)
			throws TmsDaoException {
		/******** 事故项检查 ************/
		view.setBodyChk1(StringUtil.transNullStr(entity.getBodyChk1()));
		view.setBodyChk2(StringUtil.transNullStr(entity.getBodyChk2()));
		view.setBodyChk3(StringUtil.transNullStr(entity.getBodyChk3()));
		view.setBodyChk4(StringUtil.transNullStr(entity.getBodyChk4()));
		view.setBodyChk5(StringUtil.transNullStr(entity.getBodyChk5()));
		view.setBodyChk6(StringUtil.transNullStr(entity.getBodyChk6()));
		view.setBodyChk7(StringUtil.transNullStr(entity.getBodyChk7()));
		view.setBodyChk8(StringUtil.transNullStr(entity.getBodyChk8()));
		view.setBodyChk9(StringUtil.transNullStr(entity.getBodyChk9()));
		view.setBodyChk10(StringUtil.transNullStr(entity.getBodyChk10()));
		view.setBodyChk11(StringUtil.transNullStr(entity.getBodyChk11()));
		view.setBodyChk12(StringUtil.transNullStr(entity.getBodyChk12()));
		view.setBodyChk13(StringUtil.transNullStr(entity.getBodyChk13()));
		/*********** 技术检测，车身外观检测 ***************/
		view.setOutwardChk1(StringUtil.transNullStr(entity.getOutwardChk1()));
		view.setOutwardChk2(StringUtil.transNullStr(entity.getOutwardChk2()));
		view.setOutwardChk3(StringUtil.transNullStr(entity.getOutwardChk3()));
		view.setOutwardChk4(StringUtil.transNullStr(entity.getOutwardChk4()));
		view.setOutwardChk5(StringUtil.transNullStr(entity.getOutwardChk5()));
		view.setOutwardChk6(StringUtil.transNullStr(entity.getOutwardChk6()));
		view.setOutwardChk7(StringUtil.transNullStr(entity.getOutwardChk7()));
		view.setOutwardChk8(StringUtil.transNullStr(entity.getOutwardChk8()));
		view.setOutwardChk9(StringUtil.transNullStr(entity.getOutwardChk9()));
		view.setOutwardChk10(StringUtil.transNullStr(entity.getOutwardChk10()));
		view.setOutwardChk11(StringUtil.transNullStr(entity.getOutwardChk11()));
		view.setOutwardChk12(StringUtil.transNullStr(entity.getOutwardChk12()));
		view.setOutwardChk13(StringUtil.transNullStr(entity.getOutwardChk13()));
		view.setOutwardChk14(StringUtil.transNullStr(entity.getOutwardChk14()));
		view.setOutwardChk15(StringUtil.transNullStr(entity.getOutwardChk15()));
		view.setOutwardChk16(StringUtil.transNullStr(entity.getOutwardChk16()));
		view.setOutwardChk17(StringUtil.transNullStr(entity.getOutwardChk17()));
		view.setOutwardChk18(StringUtil.transNullStr(entity.getOutwardChk18()));
		view.setOutwardChk19(StringUtil.transNullStr(entity.getOutwardChk19()));
		view.setOutwardChk20(StringUtil.transNullStr(entity.getOutwardChk20()));
		view.setOutwardChk21(StringUtil.transNullStr(entity.getOutwardChk21()));
		view.setOutwardChk22(StringUtil.transNullStr(entity.getOutwardChk22()));
		view.setOutwardChk23(StringUtil.transNullStr(entity.getOutwardChk23()));
		view.setOutwardChk24(StringUtil.transNullStr(entity.getOutwardChk25()));
		view.setOutwardChk25(StringUtil.transNullStr(entity.getOutwardChk26()));
		view.setOutwardChk26(StringUtil.transNullStr(entity.getOutwardChk27()));
		/*********** 技术检测，发动机舱检测 ***************/
		// transIntLevelToStr
		view.setEngineChk1(StringUtil
				.transIntLevelToStr(entity.getEngineChk1()));
		view.setEngineChk2(StringUtil
				.transIntLevelToStr(entity.getEngineChk2()));
		view.setEngineChk3(StringUtil
				.transIntLevelToStr(entity.getEngineChk3()));
		view.setEngineChk4(StringUtil
				.transIntLevelToStr(entity.getEngineChk4()));
		view.setEngineChk5(StringUtil
				.transIntLevelToStr(entity.getEngineChk5()));
		view.setEngineChk6(StringUtil
				.transIntLevelToStr(entity.getEngineChk6()));
		view.setEngineChk7(StringUtil
				.transIntLevelToStr(entity.getEngineChk7()));
		view.setEngineChk8(StringUtil
				.transIntLevelToStr(entity.getEngineChk8()));
		view.setEngineChk9(StringUtil
				.transIntLevelToStr(entity.getEngineChk9()));
		/*********** 技术检测，驾驶舱检测 ***************/
		// transIntLevelToStr2
		view
				.setPilotChk1(StringUtil.transIntLevelToStr2(entity
						.getPilotChk1()));
		view
				.setPilotChk2(StringUtil.transIntLevelToStr2(entity
						.getPilotChk2()));
		view
				.setPilotChk3(StringUtil.transIntLevelToStr2(entity
						.getPilotChk3()));
		view
				.setPilotChk4(StringUtil.transIntLevelToStr2(entity
						.getPilotChk4()));
		view
				.setPilotChk5(StringUtil.transIntLevelToStr2(entity
						.getPilotChk5()));
		view
				.setPilotChk6(StringUtil.transIntLevelToStr2(entity
						.getPilotChk6()));
		view
				.setPilotChk7(StringUtil.transIntLevelToStr2(entity
						.getPilotChk7()));
		view
				.setPilotChk8(StringUtil.transIntLevelToStr2(entity
						.getPilotChk8()));
		view
				.setPilotChk9(StringUtil.transIntLevelToStr2(entity
						.getPilotChk9()));
		view.setPilotChk10(StringUtil.transIntLevelToStr2(entity
				.getPilotChk10()));
		view.setPilotChk11(StringUtil.transIntLevelToStr2(entity
				.getPilotChk11()));
		view.setPilotChk12(StringUtil.transIntLevelToStr2(entity
				.getPilotChk12()));
		view.setPilotChk13(StringUtil.transIntLevelToStr2(entity
				.getPilotChk13()));
		view.setPilotChk14(StringUtil.transIntLevelToStr2(entity
				.getPilotChk14()));
		/*********** 技术检测，启动检测 ***************/
		view
				.setStartChk1(StringUtil.transIntLevelToStr2(entity
						.getStartChk1()));
		view
				.setStartChk2(StringUtil.transIntLevelToStr2(entity
						.getStartChk2()));
		view
				.setStartChk3(StringUtil.transIntLevelToStr2(entity
						.getStartChk3()));
		view
				.setStartChk4(StringUtil.transIntLevelToStr2(entity
						.getStartChk4()));
		view
				.setStartChk5(StringUtil.transIntLevelToStr2(entity
						.getStartChk5()));
		view
				.setStartChk6(StringUtil.transIntLevelToStr2(entity
						.getStartChk6()));
		view
				.setStartChk7(StringUtil.transIntLevelToStr2(entity
						.getStartChk7()));
		view
				.setStartChk8(StringUtil.transIntLevelToStr2(entity
						.getStartChk8()));
		view
				.setStartChk9(StringUtil.transIntLevelToStr2(entity
						.getStartChk9()));
		/*********** 技术检测，路试检测 ***************/
		view.setRunChk1(StringUtil.transIntLevelToStr2(entity.getRunChk1()));
		view.setRunChk2(StringUtil.transIntLevelToStr2(entity.getRunChk2()));
		view.setRunChk3(StringUtil.transIntLevelToStr2(entity.getRunChk3()));
		view.setRunChk4(StringUtil.transIntLevelToStr2(entity.getRunChk4()));
		view.setRunChk5(StringUtil.transIntLevelToStr2(entity.getRunChk5()));
		view.setRunChk6(StringUtil.transIntLevelToStr2(entity.getRunChk6()));
		view.setRunChk7(StringUtil.transIntLevelToStr2(entity.getRunChk7()));
		view.setRunChk8(StringUtil.transIntLevelToStr2(entity.getRunChk8()));
		view.setRunChk9(StringUtil.transIntLevelToStr2(entity.getRunChk9()));
		/*********** 技术检测，底盘检测 ***************/
		view.setBottomChk1(StringUtil.transIntLevelToStr2(entity
				.getBottomChk1()));
		view.setBottomChk2(StringUtil.transIntLevelToStr2(entity
				.getBottomChk2()));
		view.setBottomChk3(StringUtil.transIntLevelToStr2(entity
				.getBottomChk3()));
		view.setBottomChk4(StringUtil.transIntLevelToStr2(entity
				.getBottomChk4()));
		view.setBottomChk5(StringUtil.transIntLevelToStr2(entity
				.getBottomChk5()));
		view.setBottomChk6(StringUtil.transIntLevelToStr2(entity
				.getBottomChk6()));
		view.setBottomChk7(StringUtil.transIntLevelToStr2(entity
				.getBottomChk7()));

		return view;
	}

	/**
	 * 将高级检测信息set到viewhelp中,修改
	 * 
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	private CarSeniorDetectViewHelper setUpdateViewhelpFromDecEntity(
			CarSeniorDetectViewHelper view, TmsDetectSenior entity)
			throws TmsDaoException {
		/******** 事故项检查 ************/
		view.setBodyChk1(entity.getBodyChk1());
		view.setBodyChk2(entity.getBodyChk2());
		view.setBodyChk3(entity.getBodyChk3());
		view.setBodyChk4(entity.getBodyChk4());
		view.setBodyChk5(entity.getBodyChk5());
		view.setBodyChk6(entity.getBodyChk6());
		view.setBodyChk7(entity.getBodyChk7());
		view.setBodyChk8(entity.getBodyChk8());
		view.setBodyChk9(entity.getBodyChk9());
		view.setBodyChk10(entity.getBodyChk10());
		view.setBodyChk11(entity.getBodyChk11());
		view.setBodyChk12(entity.getBodyChk12());
		view.setBodyChk13(entity.getBodyChk13());
		/*********** 技术检测，车身外观检测 ***************/
		view.setOutwardChk1(entity.getOutwardChk1());
		view.setOutwardChk2(entity.getOutwardChk2());
		view.setOutwardChk3(entity.getOutwardChk3());
		view.setOutwardChk4(entity.getOutwardChk4());
		view.setOutwardChk5(entity.getOutwardChk5());
		view.setOutwardChk6(entity.getOutwardChk6());
		view.setOutwardChk7(entity.getOutwardChk7());
		view.setOutwardChk8(entity.getOutwardChk8());
		view.setOutwardChk9(entity.getOutwardChk9());
		view.setOutwardChk10(entity.getOutwardChk10());
		view.setOutwardChk11(entity.getOutwardChk11());
		view.setOutwardChk12(entity.getOutwardChk12());
		view.setOutwardChk13(entity.getOutwardChk13());
		view.setOutwardChk14(entity.getOutwardChk14());
		view.setOutwardChk15(entity.getOutwardChk15());
		view.setOutwardChk16(entity.getOutwardChk16());
		view.setOutwardChk17(entity.getOutwardChk17());
		view.setOutwardChk18(entity.getOutwardChk18());
		view.setOutwardChk19(entity.getOutwardChk19());
		view.setOutwardChk20(entity.getOutwardChk20());
		view.setOutwardChk21(entity.getOutwardChk21());
		view.setOutwardChk22(entity.getOutwardChk22());
		view.setOutwardChk23(entity.getOutwardChk23());
		view.setOutwardChk24(entity.getOutwardChk25());
		view.setOutwardChk25(entity.getOutwardChk26());
		view.setOutwardChk26(entity.getOutwardChk27());
		/*********** 技术检测，发动机舱检测 ***************/
		// transIntLevelToStr
		view.setEngineChk1(String.valueOf(entity.getEngineChk1()));
		view.setEngineChk2(String.valueOf(entity.getEngineChk2()));
		view.setEngineChk3(String.valueOf(entity.getEngineChk3()));
		view.setEngineChk4(String.valueOf(entity.getEngineChk4()));
		view.setEngineChk5(String.valueOf(entity.getEngineChk5()));
		view.setEngineChk6(String.valueOf(entity.getEngineChk6()));
		view.setEngineChk7(String.valueOf(entity.getEngineChk7()));
		view.setEngineChk8(String.valueOf(entity.getEngineChk8()));
		view.setEngineChk9(String.valueOf(entity.getEngineChk9()));
		/*********** 技术检测，驾驶舱检测 ***************/
		// transIntLevelToStr2
		view.setPilotChk1(String.valueOf(entity.getPilotChk1()));
		view.setPilotChk2(String.valueOf(entity.getPilotChk2()));
		view.setPilotChk3(String.valueOf(entity.getPilotChk3()));
		view.setPilotChk4(String.valueOf(entity.getPilotChk4()));
		view.setPilotChk5(String.valueOf(entity.getPilotChk5()));
		view.setPilotChk6(String.valueOf(entity.getPilotChk6()));
		view.setPilotChk7(String.valueOf(entity.getPilotChk7()));
		view.setPilotChk8(String.valueOf(entity.getPilotChk8()));
		view.setPilotChk9(String.valueOf(entity.getPilotChk9()));
		view.setPilotChk10(String.valueOf(entity.getPilotChk10()));
		view.setPilotChk11(String.valueOf(entity.getPilotChk11()));
		view.setPilotChk12(String.valueOf(entity.getPilotChk12()));
		view.setPilotChk13(String.valueOf(entity.getPilotChk13()));
		view.setPilotChk14(String.valueOf(entity.getPilotChk14()));
		/*********** 技术检测，启动检测 ***************/
		view.setStartChk1(String.valueOf(entity.getStartChk1()));
		view.setStartChk2(String.valueOf(entity.getStartChk2()));
		view.setStartChk3(String.valueOf(entity.getStartChk3()));
		view.setStartChk4(String.valueOf(entity.getStartChk4()));
		view.setStartChk5(String.valueOf(entity.getStartChk5()));
		view.setStartChk6(String.valueOf(entity.getStartChk6()));
		view.setStartChk7(String.valueOf(entity.getStartChk7()));
		view.setStartChk8(String.valueOf(entity.getStartChk8()));
		view.setStartChk9(String.valueOf(entity.getStartChk9()));
		/*********** 技术检测，路试检测 ***************/
		view.setRunChk1(String.valueOf(entity.getRunChk1()));
		view.setRunChk2(String.valueOf(entity.getRunChk2()));
		view.setRunChk3(String.valueOf(entity.getRunChk3()));
		view.setRunChk4(String.valueOf(entity.getRunChk4()));
		view.setRunChk5(String.valueOf(entity.getRunChk5()));
		view.setRunChk6(String.valueOf(entity.getRunChk6()));
		view.setRunChk7(String.valueOf(entity.getRunChk7()));
		view.setRunChk8(String.valueOf(entity.getRunChk8()));
		view.setRunChk9(String.valueOf(entity.getRunChk9()));
		/*********** 技术检测，底盘检测 ***************/
		view.setBottomChk1(String.valueOf(entity.getBottomChk1()));
		view.setBottomChk2(String.valueOf(entity.getBottomChk2()));
		view.setBottomChk3(String.valueOf(entity.getBottomChk3()));
		view.setBottomChk4(String.valueOf(entity.getBottomChk4()));
		view.setBottomChk5(String.valueOf(entity.getBottomChk5()));
		view.setBottomChk6(String.valueOf(entity.getBottomChk6()));
		view.setBottomChk7(String.valueOf(entity.getBottomChk7()));

		return view;
	}
}
